/**
 * employee管理初始化
 */
var Employee = {
    id: "EmployeeTable",	//表格id
    seItem: null,		//选中的条目
    table: null,
    layerIndex: -1,
    width: '950px',
    height: '820px'
};

var params = {

};

/**
 * 初始化表格的列
 */
Employee.initColumn = function () {
    return [
            {field: 'selectItem', checkbox: true},
            {title: '员工姓名', field: 'empName', visible: true, align: 'center', valign: 'middle', sortable: true},
            {title: '员工编码', field: 'empCode', visible: true, align: 'center', valign: 'middle', sortable: true},
            {title: '二级系统ERP编号', field: 'erpCode', visible: false, align: 'center', valign: 'middle', sortable: true},
            {title: '部门(单位）', field: 'deptName', visible: true, align: 'center', valign: 'middle', sortable: true},
            {title: '处/室', field: 'placeName', visible: true, align: 'center', valign: 'middle', sortable: true},
            {title: '班组', field: 'teamName', visible: true, align: 'center', valign: 'middle', sortable: true},
            {title: '岗位类别', field: 'postType', visible: true, align: 'center', valign: 'middle', sortable: true},
            {title: '用工类型', field: 'laborType', visible: false, align: 'center', valign: 'middle', sortable: true}
    ];
};

Employee.callbackdata = function () {
    var selected = $('#' + this.id).bootstrapTable('getSelections');
    return selected;
};

$(function () {
    var defaultColunms = Employee.initColumn();
    var table = new BSTable(Employee.id, "/employee/list", defaultColunms);
    table.setPaginationType("client");
    Employee.table = table.init();
});
